<%@ page import="com.scalar.chiptrack.utils.ConfigManager" %>

<%--
  User: Sujan
  Date: Jul 30, 2007
  Time: 1:15:56 PM
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack"%>

<chiptrack:checkLogon sourcePage="/salesForecastEntry.do"/>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>
<HTML>
    <HEAD>
        <TITLE>ScalarSoft - ChipTrac</TITLE>
        <META http-equiv=Content-Type content="text/html; charset=windows-1252">
        <LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel=stylesheet>
</HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
    <SCRIPT language="JavaScript" src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></SCRIPT>
    <SCRIPT language="JavaScript">
        function closeWindow(form)
        {
	        window.close();
        }
        function validateForm()
        {
            var form = document.salesForecastEntryForm;
            var pa = document.getElementById('errors');
            pa.innerHTML = '';
            if ( form.salesForecastFile.value.trim() == '' )
            {
                pa.innerHTML = "<li>Please select File";
                return false;
            }
            return true;
        }
    </SCRIPT>
    <table cellpadding="10" cellspacing="0" border="0" width="100%">
        <tr bgcolor="#8C87A8">
            <td height="30" valign="top" align=center class="NArialW"><font color="#FFFFFF">Sales Forecast File Upload</font></td>
            <td valign="top" align="right"><a href="javascript:window.close()" onMouseOver="window.status='Click here to close this window'; return true" onmouseout="window.status='';return true" ><font class="NArial">Close</font></a></td>
        </tr>
    </table>
<html:form method="post" action="/salesForecastEntry.do?action=upload" enctype="multipart/form-data" name="salesForecastEntryForm" type="com.scalar.forecast.salesForecastEntry.forms.SalesForecastEntryForm" onsubmit="return validateForm();">
    <img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>
    <table>
        <tr><td colspan=5><chiptrack:info styleClass="NArialL"/><chiptrack:errors styleClass="NArialL"/></td></tr>
        <tr><td colspan=5 class="NArialL"><font id="errors" color="red"/></td></tr>
    </table>
    <table border="0" width="90%"  class='NArialL' align=center>
        <tr>
            <td>
                <table border="0" width="100%" bgcolor="black">
                    <tr>
                        <td><font class='NArialL'>Upload File:</font></td>
                        <td  align="left"><html:file styleClass="txfield" property="salesForecastFile"/></td>
                    </tr>
                    <tr>
                        <td><font class='NArialL' size="1">(Upload Microsoft Excel(.xls) File Only)</font></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr align="center">
            <td><html:submit value="Upload" styleClass="button"/></td>
        </tr>
        <tr><td><img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=40></td></tr>
        <tr><td><font class="NArialL">The Excel file Should be in the following format:</font></td></tr>
        <tr>
            <td>
                <table border="1" cellspacing=0 width="100%">
                    <tr>
                        <td class="NArialL">Region</td>
                        <td class="NArialL">CUSTOMER</td>
                        <td class="NArialL">END CUSTOMER</td>
                        <td class="NArialL">END USER</td>
                        <td class="NArialL">PROJECT NAME</td>
                        <td class="NArialL">Program</td>
                        <td class="NArialL">PART NUMBER</td>
                        <td class="NArialL">&nbsp; &nbsp;</td>
                        <td class="NArialL">July-2010</td>
                        <td class="NArialL">August-2010</td>
                    </tr>
                    <tr>
                        <td class="smalltext">Europe</td>
                        <td class="smalltext">MOTOROLA</td>
                        <td class="smalltext">ALU</td>
                        <td class="smalltext">ALU</td>
                        <td class="smalltext">QMI-ALU-BCS220</td>
                        <td class="smalltext">Mobile</td>
                        <td class="smalltext">BCS220</td>
                        <td><table border="1" cellspacing=0 width="100%">
							<Tr><td class="smalltext">Qty</td></tr>
							<tr><td class="smalltext">ASP</td></tr>
							<tr><td nowrap class="smalltext">Fcst Rev</td></tr></table>
						</td>
						<td><table border="1" cellspacing=0 width="100%">
							<Tr><td class="smalltext">10000</td></tr>
							<tr><td class="smalltext">1.00</td></tr>
							<tr><td class="smalltext">$100,00.00</td></tr></table>
						</td>
						<td><table border="1" cellspacing=0 width="100%">
							<Tr><td class="smalltext">4000</td></tr>
							<tr><td class="smalltext">2.00</td></tr>
							<tr><td class="smalltext">$8,000.00</td></tr></table>
						</td>
                    </tr>
                </table>
            </td>
        </tr>
     </table>
 </html:form>
</BODY>
</HTML>
